<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:88:"D:\PHPTutorial\WWW\guyun\public/../application/admin\view\apidocument\carsViolation.html";i:1542268619;s:64:"D:\PHPTutorial\WWW\guyun\application\admin\view\common\head.html";i:1541553786;s:66:"D:\PHPTutorial\WWW\guyun\application\admin\view\common\footer.html";i:1515220430;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>上海顾云数据科技中心</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/build/css/app.css" media="all">
</head>
<style>
    .hidden{
        display: none;
    }

</style>

<div style="overflow-x: hidden;width: 96%;margin: auto;padding-top: 2rem;">
  <blockquote class="layui-elem-quote"><span>数据中心&nbsp;&nbsp;&nbsp;&nbsp;接口文档&nbsp;&nbsp;&nbsp;&nbsp;全国车辆违章数据接口</span></blockquote>
  <div class="demoTable layui-form">
    <div style="margin-bottom: 0.5em"><b>连接地址:</b></div>
    <input type="text" placeholder="guyundata.com/api/Api/carsViolationRecode" name="admin_name" class="layui-input" disabled="">
  </div>
  <div class="demoTable layui-form" style="margin-top: 0.5em">
    <div style="margin-bottom: 0.5em"><b>请求方式:</b></div>
    <input type="text" placeholder="POST" name="admin_name" class="layui-input" disabled="">
  </div>
  <div class="layui-form" style="margin-top: 0.5em">
    <div style="margin-bottom: 0.5em"><b>请求参数:</b></div>
    <table class="layui-table">
      <colgroup>
        <col width="150">
        <col width="150">
        <col width="200">
        <col>
      </colgroup>
      <thead>
      <tr>
        <th>参数名</th>
        <th>类型</th>
        <th>是否必填</th>
        <th>说明</th>
        <th>值</th>
      </tr>
      </thead>
      <tbody>
      <td>appKey</td>
      <td>string</td>
      <td>是</td>
      <td>身份标识</td>
      <td>
        <span class="key">Z3V5dW5rZWppZ3V5dW4x</span>
      </td>
      </tr>
      <tr>
        <td>city</td>
        <td>string</td>
        <td>是</td>
        <td>城市代码</td>
        <td>
          <span class="key">BJ</span>
        </td>
      </tr>
      <tr>
        <td>hphm</td>
        <td>string</td>
        <td>是</td>
        <td>车牌号码 完整7位(需要utf8编码的urlencode)</td>
        <td>
          <span class="key"></span>
        </td>
      </tr>
      <tr>
        <td>hpzl</td>
        <td>string</td>
        <td>是</td>
        <td>号牌类型，02:小型车，01:大型车</td>
        <td>
          <span class="key">01</span>
        </td>
      </tr>
      <tr>
        <td>engineno</td>
        <td>string</td>
        <td>否</td>
        <td>发动机号 (具体是否需要根据城市接口中的参数填写)</td>
        <td>
          <span class="key"></span>
        </td>
      </tr>
      <tr>
        <td>classno</td>
        <td>string</td>
        <td>否</td>
        <td>车架号 (具体是否需要根据城市接口中的参数填写)</td>
        <td>
          <span class="key"></span>
        </td>
      </tr>
      <tr>
        <td>key</td>
        <td>string</td>
        <td>是</td>
        <td>接口key值</td>
        <td>
          <span class="key">8190dc81dc0691aa56e0fd11fc23e7c0</span>
        </td>
      </tr>
      <tr>
        <td>urltype</td>
        <td>int</td>
        <td>是</td>
        <td>接口类型</td>
        <td>
          <span class="key">该参数为固定值:12</span>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="layui-form" style="margin-top: 1.2em">
    <div style="margin-bottom: 0.5em"><b>返回内容:</b></div>
    <div style="padding: 20px; background-color: #F2F2F2;">
      <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
          <div class="layui-card">
            <div class="layui-card-body">
              <pre class='response'></pre>
            </div>
          </div>
        </div>
      </div>
    </div> 
  </div>
  <div class="layui-form" style="margin-top: 0.5em">
    <div style="margin-bottom: 0.5em"><b>返回参数:</b></div>
    <table class="layui-table">
      <colgroup>
        <col width="150">
        <col width="150">
        <col width="200">
        <col>
      </colgroup>
      <thead>
      <tr>
        <th>名称</th>
        <th>类型</th>
        <th>说明</th>
      </tr>
      </thead>
      <tbody>
      <td>reason</td>
      <td>string</td>
      <td>状态提示</td>
      </tr>
      <tr>
        <td>error_code</td>
        <td>int</td>
        <td>状态码</td>
      </tr>
      <tr>
        <td>result</td>
        <td>json</td>
        <td>返回结果</td>
      </tr>
      <tr>
        <td>province</td>
        <td>string</td>
        <td>省份</td>
      </tr>
      <tr>
        <td>city</td>
        <td>string</td>
        <td>城市</td>
      </tr>
      <tr>
        <td>hphm</td>
        <td>string</td>
        <td>查询的号牌号码
        </td>
      </tr>
      <tr>
        <td>lists</td>
        <td>Array</td>
        <td>违章列表
        </td>
      </tr>
      <tr>
        <td>date</td>
        <td>string</td>
        <td>违章时间</td>
      </tr>
      <tr>
        <td>area</td>
        <td>string</td>
        <td>违章地点</td>
      </tr>
      <tr>
        <td>archiveno</td>
        <td>string</td>
        <td>文书编号(不一定会获取到)</td>
      </tr>
      <tr>
        <td>act</td>
        <td>string</td>
        <td>违章行为</td>
      </tr>
      <tr>
        <td>code</td>
        <td>string</td>
        <td>违章代码(仅供参考，不一定有值)</td>
      </tr>
      <tr>
        <td>fen</td>
        <td>string</td>
        <td>违章扣分(仅供参考，不一定有值)</td>
      </tr>
      <tr>
        <td>money</td>
        <td>string</td>
        <td>违章罚款(仅供参考，不一定有值)</td>
      </tr>
      <tr>
        <td>handled</td>
        <td>string</td>
        <td>是否处理,1处理 0未处理 空未知</td>
      </tr>
      <tr>
        <td>hpzl</td>
        <td>string</td>
        <td>车牌类型(02小型车)</td>
      </tr>
      <tr>
        <td>wzcity</td>
        <td>string</td>
        <td>违章城市(不一定有值)</td>
      </tr>
      </tbody>
    </table>
  </div>
  <blockquote class="layui-elem-quote"><span>数据中心&nbsp;&nbsp;&nbsp;&nbsp;接口文档&nbsp;&nbsp;&nbsp;&nbsp;获取城市代码接口</span></blockquote>
  <div class="demoTable layui-form">
    <div style="margin-bottom: 0.5em"><b>连接地址:</b></div>
    <input type="text" placeholder="guyundata.com/api/Api/getCityCode" name="admin_name" class="layui-input" disabled="">
  </div>
  <div class="demoTable layui-form" style="margin-top: 0.5em">
    <div style="margin-bottom: 0.5em"><b>请求方式:</b></div>
    <input type="text" placeholder="POST" name="admin_name" class="layui-input" disabled="">
  </div>
  <div class="layui-form" style="margin-top: 0.5em">
    <div style="margin-bottom: 0.5em"><b>请求参数:</b></div>
    <table class="layui-table">
      <colgroup>
        <col width="150">
        <col width="150">
        <col width="200">
        <col>
      </colgroup>
      <thead>
      <tr>
        <th>参数名</th>
        <th>类型</th>
        <th>是否必填</th>
        <th>说明</th>
        <th>值</th>
      </tr>
      </thead>
      <tbody>
      <td>appKey</td>
      <td>string</td>
      <td>是</td>
      <td>身份标识</td>
      <td>
        <span class="key">Z3V5dW5rZWppZ3V5dW4x</span>
      </td>
      </tr>
      <tr>
        <td>urltype</td>
        <td>int</td>
        <td>是</td>
        <td>接口类型</td>
        <td>
          <span class="key">该参数为固定值:12</span>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="layui-form" style="margin-top: 1.2em">
    <div style="margin-bottom: 0.5em"><b>返回内容:</b></div>
    <div style="padding: 20px; background-color: #F2F2F2;">
      <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
          <div class="layui-card">
            <div class="layui-card-body">
              <pre class='response1'></pre>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
    <script src="/static/admin/layui/layui.js"></script>
<script src="/static/common/js/jquery.min.js"></script>
<script>
//    图片放大显示
    $('.select_img').on('click',function () {
        var img_url=$(this).data('content');
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['50%','80%'],
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: true,
            content: '<img src="'+img_url+'" />',
        });
    })
    //文件上传
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;
        //多文件列表示例
        var demoListView = $('#demoList')
            ,uploadListIns = upload.render({
            elem: '#testList'
            ,url: '<?php echo url("Upload/file_images"); ?>'
            ,accept: 'file'
            ,multiple: true
            ,auto: false
            ,bindAction: '#testListAction'
            ,choose: function(obj){
                var files = obj.pushFile(); //将每次选择的文件追加到文件队列
                //读取本地文件
                obj.preview(function(index, file, result){
                    var tr = $(['<tr id="upload-'+ index +'">'
                        ,'<td>'+ file.name +'</td>'
                        ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
                        ,'<td>等待上传</td>'
                        ,'<td>'
                        ,'<button class="layui-btn layui-btn-mini demo-reload layui-hide">重传</button>'
                        ,'<button class="layui-btn layui-btn-mini layui-btn-danger demo-delete">删除</button>'
                        ,'</td>'
                        ,'</tr>'].join(''));

                    //单个重传
                    tr.find('.demo-reload').on('click', function(){
                        obj.upload(index, file);
                    });

                    //删除
                    tr.find('.demo-delete').on('click', function(){
                        delete files[index]; //删除对应的文件
                        tr.remove();
                    });

                    demoListView.append(tr);
                });
            }
            ,done: function(res, index, upload){
                if(res.code == 200){ //上传成功
                    var tr = demoListView.find('tr#upload-'+ index)
                        ,tds = tr.children();
                    tds.eq(2).html('<span style="color: #5FB878;">上传成功</span><input type="hidden" name="images['+index+']" value="'+res.data.src+'">');
                    tds.eq(3).html(''); //清空操作
                    delete files[index]; //删除文件队列已经上传成功的文件
                    return;
                }
                this.error(index, upload);
            }
            ,error: function(index, upload){
                var tr = demoListView.find('tr#upload-'+ index)
                    ,tds = tr.children();
                tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
                tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
            }
        });

        //普通图片上传 单图片上传
        var uploadInst = upload.render({
            elem: '#image'
            ,url: '<?php echo url("Upload/file_images"); ?>'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#show_image').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code == 400){
                    return layer.msg('上传失败');
                }
                $('.value_image').val(res.data.src);
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });
    });
</script>

<script src="/static/admin/jquery.js"></script>
<script type="text/javascript">

        function syntaxHighlight(json) {

            if (typeof json != 'string') {

                json = JSON.stringify(json, undefined, 2);

            }

            json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');

            return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function(match) {

                var cls = 'number';

                if (/^"/.test(match)) {

                    if (/:$/.test(match)) {

                        cls = 'key';

                    } else {

                     cls = 'string';

                    }

                } else if (/true|false/.test(match)) {

                    cls = 'boolean';

                } else if (/null/.test(match)) {

                    cls = 'null'; 

                }

                return '<span class="' + cls + '">' + match + '</span>';

            });

        }

    </script>
<script>
  var data = {
      "resultcode": "200",
      "reason": "查询成功",
      "result": {
          "province": "GD",
          "city": "GD_JM",
          "hphm": "赣DP2327",
          "hpzl": "02",
          "lists": [
              {
                  "date": "2017-07-11 11:45:00",
                  "area": "港湾大道银坑村路口",
                  "act": "驾驶机动车在划有导向车道的路口，不按所需行进方向驶入导向车道，不按规定方向行驶的",
                  "code": "4404067900172059",
                  "fen": "2",
                  "wzcity": "广东珠海",
                  "money": "300",
                  "handled": "0",
                  "archiveno": "4404067900172059"
              },
              {
                  "date": "2017-10-04 20:22:33",
                  "area": "番禺大道富华东路路口",
                  "act": "机动车通过有灯控路口时，不按所需行进方向驶入导向车道的",
                  "code": "4401267902030070",
                  "fen": "2",
                  "wzcity": "广东广州",
                  "money": "100",
                  "handled": "0",
                  "archiveno": "4401267902030070"
              },
              {
                  "date": "2017-10-21 11:20:00",
                  "area": "广州绕城高速145公里200米",
                  "act": "驾驶中型以上载客载货汽车、危险物品运输车辆以外的其他机动车行驶超过规定时速10%未达20%的",
                  "code": "4406997901477224",
                  "fen": "3",
                  "wzcity": "广东佛山",
                  "money": "150",
                  "handled": "0",
                  "archiveno": "4406997901477224"
              },
              {
                  "date": "2017-11-21 17:52:06",
                  "area": "广州市番禺区广场东路路段",
                  "act": "机动车违反禁令标志指示的",
                  "code": "4401267902177105",
                  "fen": "3",
                  "wzcity": "广东广州",
                  "money": "200",
                  "handled": "0",
                  "archiveno": "4401267902177105"
              },
              {
                  "date": "2017-09-15 11:40:00",
                  "area": "广州市番禺区嘉胜路",
                  "act": "机动车违反规定停放、临时停车，妨碍其它车辆、行人通行的",
                  "code": "4401267901951920",
                  "fen": "0",
                  "wzcity": "广东广州",
                  "money": "200",
                  "handled": "0",
                  "archiveno": "4401267901951920"
              },
              {
                  "date": "2017-10-03 22:03:00",
                  "area": "螺山路环村路路口",
                  "act": "通过路口遇停止信号时，停在停止线以内或路口内的",
                  "code": "4401267902027680",
                  "fen": "2",
                  "wzcity": "广东广州",
                  "money": "100",
                  "handled": "0",
                  "archiveno": "4401267902027680"
              },
              {
                  "date": "2017-10-29 20:31:00",
                  "area": "桥南街南堤东路",
                  "act": "机动车违反规定停放、临时停车，妨碍其它车辆、行人通行的",
                  "code": "4401267902105566",
                  "fen": "0",
                  "wzcity": "广东广州",
                  "money": "200",
                  "handled": "0",
                  "archiveno": "4401267902105566"
              }
          ]
      },
      "error_code": 0
  }
  $('.response').html(syntaxHighlight(data));
  var city = {
      "resultcode": "200",
      "reason": "成功的返回",
      "result": {
          "BJ": {
              "province": "北京",
              "province_code": "BJ",
              "citys": [
                  {
                      "city_name": "北京",
                      "city_code": "BJ",
                      "abbr": "京",
                      "engine": "1",
                      "engineno": "0",
                      "classa": "1",
                      "class": "1",
                      "classno": "6",
                      "regist": "0",
                      "registno": "0"
                  }
              ]
          },
          "SH": {
              "province": "上海",
              "province_code": "SH",
              "citys": [
                  {
                      "city_name": "上海",
                      "city_code": "SH",
                      "abbr": "沪",
                      "engine": "1",
                      "engineno": "0",
                      "classa": "1",
                      "class": "1",
                      "classno": "6",
                      "regist": "0",
                      "registno": "0"
                  }
              ]
          },
          "SC": {
              "province": "四川",
              "province_code": "SC",
              "citys": [
                  {
                      "city_name": "成都",
                      "city_code": "SC_CD",
                      "abbr": "川",
                      "engine": "1",
                      "engineno": "6",
                      "classa": "1",
                      "class": "1",
                      "classno": "6",
                      "regist": "0",
                      "registno": "0"
                  }]
          }
      }
  };
  $('.response1').html(syntaxHighlight(city));
</script>
</body>
</html>